#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>

int main()
{
	int n = 0;
	scanf("%d", &n);
	int temp1 = (n-1);
	int temp2 = n * (n - 1);
	do
	{
		temp1 = temp1 - 1;
		temp2 = temp2 * temp1;

	} 
	while (temp1 > 1);
		
	printf("%d", temp2);

	return 0;
}